﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Discuss
    {
        private IDiscuss dal;
        public Discuss()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateDiscuss();
        }

        public DataTable sel_discussInfo(string Id, int flag)
        {
            return dal.sel_discussInfo(Id, flag);
        }
        public string sel_disInfoStr(string VoteID,int flag)
        {
            return dal.sel_disInfoStr(VoteID,flag);
        }
        public DataTable sel_disTable(int flag)
        {
            return dal.sel_disTable(flag);
        }
        public int sel_getDiscuss(string Str, int flag)
        {
            return dal.sel_getDiscuss(Str,flag);
        }
        public string sel_discussStr()
        {
            return dal.sel_discussStr();
        }
        public int update_discussInfo(DateTime tm, string hidd, int flag)
        {
            return dal.update_discussInfo(tm,hidd,flag);
        }
        public int update_userDis(string Fundwarehouse1, string DisID)
        {
            return dal.update_userDis(Fundwarehouse1,DisID);
        }
        #region message_discussacti.aspx
        public int add_userDiscuss(STDiscussActive DA)
        {
            return dal.add_userDiscuss(DA);
        }
        #endregion

        #region message_discussacti_list.aspx
        public int Delete(string ID, string SiteID)
        {
            return dal.Delete(ID, SiteID);
        }
        #endregion

        #region message_discussclass_add.aspx
        public int add_disClass(string DcID, string Cname, string Content, string indexnumber, string SiteID)
        {
            return dal.add_disClass(DcID, Cname, Content, indexnumber, SiteID);
        }
        #endregion

        #region message_discusssubclass_add.aspx
        public void getsClassDel(string ID,int flag)
        {
            dal.getsClassDel(ID,flag);
        }

        #endregion

        #region discussclass.aspx
        public int del_userDiscuss(string ID,int flag)
        {
            return dal.del_userDiscuss(ID, flag);
        }
        #endregion


        #region add_discussManage.aspx
        public int update_sysUserInfo(int cPoint2, int aPoint2, string UserNum,int flag)
        {
            return dal.update_sysUserInfo(cPoint2, aPoint2, UserNum, flag);
        }
        public int add_discussInfo(STDiscuss DIS)
        {
            return dal.add_discussInfo(DIS);
        }
        #endregion

        #region discuss_Manageadd.aspx
        public int add_Ghistory(string GhID, string UserNum, int Authority3, int Authority2, DateTime Creatime)
        {
            return dal.add_Ghistory(GhID, UserNum, Authority3, Authority2, Creatime);           
        }
        public int sel_disInfo(string UserNum, string DisID, int flag)
        {
            return dal.sel_disInfo(UserNum, DisID,flag);            
        }
        public int add_disMember(string Member, string DisID, string UserNum, DateTime Creatime)
        {
            return dal.add_disMember(Member, DisID, UserNum, Creatime);           
        }
        #endregion

        #region discussacti_add.aspx
        public int sel_userInfo(string AId, int flag)
        {
            return dal.sel_userInfo(AId,flag);
        }
        public int add_disActiveMember(string Telephone, int ParticipationNum, int isCompanion, string UserNum, string AIds, string PId, DateTime CreaTime)
        {
            return dal.add_disActiveMember(Telephone, ParticipationNum, isCompanion, UserNum, AIds, PId, CreaTime);
        }
        #endregion

        #region discussacti_up.aspx
        public int update_disActive(string Activesubject, string ActivePlace, string ActiveExpense, int Anum, string ActivePlan, string Contactmethod, DateTime Cutofftime, DateTime CreaTime, int ALabel, string AIds)
        {
            return dal.update_disActive(Activesubject, ActivePlace, ActiveExpense, Anum, ActivePlan, Contactmethod, Cutofftime, CreaTime, ALabel, AIds);
        }
        #endregion

        #region discussManage_DC.aspx
        public string sel_userDisClass(string DcID, string indexnumber)
        {
            return dal.sel_userDisClass(DcID, indexnumber);
        }
        #endregion

        #region discusssubclass_add.aspx
        public int add_discussClass(string DcID, string Cname, string Content, string indexnumber,bool flag)
        {
            return dal.add_discussClass(DcID, Cname, Content, indexnumber,flag);
        }
        #endregion

        #region discussTopi_add.aspx
        public int add_discussTopic(string DtID, string Title, string Content, int source, string DtUrl, string UserNum, DateTime creatTime, DateTime voteTime, string DisID)
        {
            return dal.add_discussTopic(DtID, Title, Content, source, DtUrl, UserNum, creatTime, voteTime, DisID);
        }
        #endregion

        #region discussTopi_ballot.aspx
        public int add_userDiscussTopic(string DtID, string Title, string Content, string UserNum, DateTime creatTime, DateTime voteTime, string DisID)
        {
            return dal.add_userDiscussTopic(DtID, Title, Content, UserNum, creatTime, voteTime, DisID);
        }
        #endregion

        #region discussTopi_commentary.aspx
        public void add_userDisTopic(NetCMS.Model.STADDDiscuss uc)
        {
            dal.add_userDisTopic(uc);
        }
        public int update_userVote(int VoteNumsel, string VoteID)
        {
            return dal.update_userVote(VoteNumsel, VoteID);
        }

        public void updateTopicDtID(string DtID, string title, string content)
        {
            dal.updateTopicDtID(DtID, title, content);
        }
        #endregion

        #region disFundwarehouse.aspx
        public int add_userGhistory(string GhID, string UserNum, int gPoint1, int iPoint1, DateTime Creatime)
        {
            return dal.add_userGhistory(GhID, UserNum, gPoint1, iPoint1, Creatime);
        }
        public int add_userDisCon(string Fundwarehouse2, string UserNum, string DisID, DateTime Creatime)
        {
            return dal.add_userDisCon(Fundwarehouse2, UserNum, DisID, Creatime);
        }
        #endregion

        #region up_discussManage.aspx
        public DataTable sel_userDiscuss(string DID, string UserName)
        {
            return dal.sel_userDiscuss(DID, UserName);
        }
        public int update_userDis(string Cname, string Authority, string Authoritymoney, string D_Content, string D_anno, DateTime Creatime, string ClassID, string Did, string UserName1)
        {
            return dal.update_userDis(Cname, Authority, Authoritymoney, D_Content, D_anno, Creatime, ClassID, Did, UserName1);
        }
        #endregion
    }
}